package org.diyi.Tools;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.MapListHandler;

import com.alibaba.druid.pool.DruidDataSourceFactory;

public class BaseDao {
	public static QueryRunner query=null;
		static {
			Properties properties=new Properties();
			try {
				properties.load(BaseDao.class.getResource("/config.propertie").openStream());
				DataSource ds = DruidDataSourceFactory.createDataSource(properties);
			 query = new QueryRunner(ds);
			} catch (Exception e) {
				
				e.printStackTrace();
			}
		}
}
